using System;

namespace SuperWar.Common
{
	/// <summary>
	/// 逻辑监听器，由前端引擎负责实现
	/// </summary>
	public interface ILogicEngineListener
	{
		/// <summary>
		///添加普通的sprite
		/// </summary>
		/// <param name="spriteId">Sprite identifier.</param>
		/// <param name="x">The x coordinate.</param>
		/// <param name="y">The y coordinate.</param>
		/// <param name="direction">Direction.</param>
		void onAddSprite(int spriteId,float x,float y,int direction);

		/// <summary>
		/// sprite位置状态等的更新
		/// </summary>
		/// <param name="spriteId">Sprite identifier.</param>
		/// <param name="x">The x coordinate.</param>
		/// <param name="y">The y coordinate.</param>
		/// <param name="direction">Direction.</param>
		void onUpdateSprite(int spriteId,float x,float y,int direction);

		/// <summary>
		/// sprite移除
		/// </summary>
		/// <param name="spriteId">Sprite identifier.</param>
		void onRemoveSprite(int spriteId);


	}

	/// <summary>
	/// 前端监听器，由逻辑引擎负责实现
	/// </summary>
	public interface IFrontEngineListener
	{
		/// <summary>
		/// 系统时钟
		/// </summary>
		/// <param name="currentTimeMillis">Current time millis.</param>
		void onSystemTimer(long currentTimeMillis);

		/// <summary>
		/// 用户触摸
		/// </summary>
		/// <param name="x">The x coordinate.</param>
		/// <param name="y">The y coordinate.</param>
		void onTouch(float x,float y);

		/// <summary>
		/// 触摸到某个sprite
		/// </summary>
		/// <param name="spriteId">Sprite identifier.</param>
		void onTouchSprite(int spriteId);
	}
}

